//
//  RadioInfoViewController.m
//  Lianxi2
//
//  Created by lanou on 16/7/5.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "RadioInfoViewController.h"

@interface RadioInfoViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (weak, nonatomic) IBOutlet UITableView *tableview;
@property (weak, nonatomic) IBOutlet UIView *imagePhoto;
@property (weak, nonatomic) IBOutlet UISlider *slider;
@property (weak, nonatomic) IBOutlet UIWebView *webview;

@property (nonatomic,assign)NSInteger currentIndex;
@property (nonatomic,strong)UIView *greenView;

@end

@implementation RadioInfoViewController

- (UIView *)greenView{
    if (!_greenView) {
        _greenView = [[UIView alloc]initWithFrame:CGRectMake(kWidth-10, 0, 10, 200)];
        _greenView.backgroundColor = [UIColor grayColor];
    }
    return _greenView;
}

- (void)setDataSource:(NSMutableArray *)dataSource{
    if (_dataSource[0] != dataSource[0]) {
        
    }
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    //设置webView
    self.webview.backgroundColor = [UIColor grayColor];
    self.webview.opaque = NO;
    
    self.automaticallyAdjustsScrollViewInsets = NO;
    
    [self.tableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"abc"];
    
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.dataSource.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    RadioListModel *model = self.dataSource[indexPath.row];
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"abc" forIndexPath:indexPath];
    cell.backgroundColor = [UIColor redColor];
    cell.textLabel.text = model.title;
    
    
    return cell;
}
- (void)setInformationWithIndex:(NSInteger)index{
    RadioListModel *model = self.dataSource[index];
    
    
    dispatch_async(dispatch_get_global_queue(0, 0), ^{
       
        
        
        dispatch_async(dispatch_get_main_queue(), ^{
           
            
            
        });
        
    });
    
}


- (IBAction)sliderAction:(UISlider *)sender {
    
    
    
}
- (IBAction)lastMusic:(id)sender {
    
    
}
- (IBAction)nextMusic:(id)sender {
    
    
}
- (IBAction)playMusic:(UIButton *)sender {
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}




/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
